local skel = fk.CreateSkill {
  name = "emo__fennu",
}

Fk:loadTranslationTable{
  ["emo__fennu"] = "愤怒",
  [":emo__fennu"] = "出牌阶段限一次，你可以对任意名体力值不相等的角色依次造成1点火焰伤害，然后横置这些角色。",
  ["#emo__fennu-prompt"] = "愤怒:对任意名体力值不相等的角色各造成1点火焰伤害，然后横置他们",
}

skel:addEffect("active", {
  anim_type = "offensive",
  prompt = "#emo__fennu-prompt",
  card_num = 0,
  min_target_num = 1,
  card_filter = Util.FalseFunc,
  target_filter = function (self, player, to_select, selected, selected_cards, card, extra_data)
    return table.every(selected, function (p)
      return to_select.hp ~= p.hp
    end)
  end,
  times = function (self, player)
    return 1 - player:usedSkillTimes(skel.name, Player.HistoryPhase)
  end,
  can_use = function(self, player)
    return player:usedSkillTimes(skel.name, Player.HistoryPhase) == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    room:sortByAction(effect.tos)
    for _, p in ipairs(effect.tos) do
      if not p.dead then
        room:doIndicate(player, {p})
        room:damage { from = player, to = p, damage = 1, skillName = skel.name, damageType = fk.FireDamage }
      end
    end
    for _, p in ipairs(effect.tos) do
      if not p.dead and not p.chained then
        p:setChainState(true)
      end
    end
  end,
})

return skel
